package com.grm.entity;

import java.io.Serializable;

import com.grm.enums.Desensitized;
import com.grm.enums.SensitiveTypeEnum;
import lombok.Data;
import lombok.ToString;

/**
 * 用户,一定要序列化
 */
@Data
@ToString
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    private Integer id;

    /**
     * 用户名
     */
    @Desensitized(type = SensitiveTypeEnum.CHINESE_NAME)
    private String username;

    /**
     * 密码
     */
    @Desensitized(type = SensitiveTypeEnum.PASSWORD)
    private String password;

    /**
     * 电话
     */
    @Desensitized(type = SensitiveTypeEnum.MOBILE_PHONE)
    private String phone;

    /**
     * 邮箱
     */
    @Desensitized(type = SensitiveTypeEnum.EMAIL)
    private String email;

    /**
     * 身份证
     */
    @Desensitized(type = SensitiveTypeEnum.ID_CARD)
    private String idCard;

}
